#include <fstream>

int main()
{
	std::ifstream file_in("in.txt");
	std::ofstream file_out("out.txt");
	
	long a, b, c;

	while(!file_in.eof())
	{
		file_in >> a >> b >> c;
		
		if ( a == 0 && b == 0 ) 
		{
			file_out << ((c == 0) ? "0 0" : "<none>") << std::endl;
		}
		else if ( a == 0 || b == 0)
		{	
			long tmp = ((a == 0) ? b : a);
			if ( c % tmp == 0 )	file_out << "0 " << c / tmp << std::endl;
			else				file_out << "<none>" << std::endl;
		}
		else 
		{
			long a_m = 1, a_n = 0;
			long b_m = 0, b_n = 1;
			
			while(a != b)
			{
				if(a > b)
				{
					a -= b;
					a_m -= b_m;
					a_n -= b_n;
				}
				else
				{
					b -= a;
					b_m -= a_m;
					b_n -= a_n;
				}
			}
		
			if (c % a == 0) 
			{
				file_out << a_m * c << ' ' << a_n * c << std::endl; 
			}
			else	file_out << "<none>" << std::endl;
		}
	}

	return 0;
}